﻿using System;
namespace Ekton_Manage_Framework.Methods.Cache
{
    /// <summary>
    /// 缓存接口
    /// </summary>
    public interface ICacheContext<T>
    {
        bool Exists(string key);
        T GetCache<T>(string key);
        void SetCache(string key, object value);
        void SetCache(string key, object value, double expirationMinute);
        void SetCache(string key, object value, DateTimeOffset expirationTime);
        void SetSlidingCache(string key, object value, TimeSpan t);
        void RemoveCache(string key);
        void Dispose();
    }
}
